--抽奖
return function(msg, qq, group)


    local cards = apiXmlGet(tostring(group), "banCard", tostring(qq))
    cards = cards == "" and 0 or tonumber(cards) or 0
    local kcards = apiXmlGet(tostring(group), "keepCard", tostring(qq))
    kcards = kcards == "" and 0 or tonumber(kcards) or 0

    --禁言卡查询
    if msg == "禁言卡" then

        return cqCode_At(qq) .. "当前数量\r\n禁言卡：" .. tostring(cards).."\r\n".. "免禁卡：" .. tostring(kcards)

        --禁言
    elseif msg:find("%[CQ:at,qq=") and msg:find("禁言卡") then
        if cards <= 0 then
            return cqCode_At(qq) .. "你只有" .. tostring(cards) .. "张禁言卡，无法操作"
        end
        local v = tonumber(msg:match("(%d+)"))
        kcards = apiXmlGet(tostring(group), "keepCard", tostring(v))
        kcards = kcards == "" and 0 or tonumber(kcards) or 0

        if kcards == 0 then
            apiXmlSet(tostring(group), "banCard", tostring(qq), tostring(cards-1))
            local banTime = math.random(1, 10)
            cqSetGroupBanSpeak(group, v, banTime * 60)
            return cqCode_At(qq) .. "已将" .. tostring(v) .. "禁言\r\n" .. tostring(banTime) .. "分钟\r\n消耗禁言卡1张"
        end
        c = cards-kcards --消耗后的数量

        if c >0 then
            apiXmlSet(tostring(group), "banCard", tostring(qq), tostring(c))
            apiXmlSet(tostring(group), "keepCard", tostring(v), tostring(0))
            local banTime = math.random(1, 10)
            cqSetGroupBanSpeak(group, v, banTime * 60)
            return cqCode_At(qq) .. "已将" .. tostring(v) .. "禁言\r\n" .. tostring(banTime) .. "分钟\r\n消耗禁言卡"..kcards.."张"
                
        end
        apiXmlSet(tostring(group), "banCard", tostring(qq), tostring(0))
        apiXmlSet(tostring(group), "keepCard", tostring(v), tostring(-c))
        return cqCode_At(qq).."禁言无效\r\n消耗禁言卡"..cards.."张"
        
        --禁言解除
    elseif msg:find("%[CQ:at,qq=") and msg:find("禁言解除") then
        local v = tonumber(msg:match("(%d+)"))
        if cards <= 0 then
            return cqCode_At(qq) .. "你只有" .. tostring(cards) .. "张禁言卡，无法操作"
        end
        apiXmlSet(tostring(group), "banCard", tostring(qq), tostring(cards - 1))
        cqSetGroupBanSpeak(group, v, -1)
        local v = tonumber(msg:match("(%d+)"))
        return cqCode_At(qq) .. "已将" .. tostring(v) .. "解除禁言" 
    else
        return "禁言卡 禁言命令：禁言卡@QQ ".."\n".."禁言卡解除禁言命令：禁言解除@QQ "
    end
end
